package com.ihr360.payroll.config;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ihr360.commons.model.entity.NumberId;
import com.ihr360.commons.model.type.BenefitsPayer;
import com.ihr360.commons.model.type.NumOperation;
import com.ihr360.payroll.config.reference.ReferencePropertyEntity;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AbstractSalaryFieldEntity extends NumberId<Long> {
    /** 名称 */
    protected String name;

    /** 序号 */
    protected int indexno = 1;

    /** 薪资项目类别 */
    protected SalaryFieldTypeEntity type;

    /** 员工收入计算规则 */
    @Enumerated(EnumType.STRING)
    protected NumOperation personalSalaryNumOp;

    /** 公司成本计算规则 */
    @Enumerated(EnumType.STRING)
    protected NumOperation companyCostNumOp;

    /** 缴税类型 */
    protected SalaryTaxTypeEntity taxType;

    /** 承担方 */
    private BenefitsPayer payer;

    /** 实际承担方 */
    private BenefitsPayer actualPayer;
    /** 是否是合并计税项目,只有系统能控制 */
    private boolean taxMergeField;

    /** 是否可导入 */
    private boolean importField = true;

    /** 是否可导出 */
    private boolean exportField = true;

    /**
     * 对应的引用字段信息
     */
    ReferencePropertyEntity refProperty;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndexno() {
        return indexno;
    }

    public void setIndexno(int indexno) {
        this.indexno = indexno;
    }

    public SalaryFieldTypeEntity getType() {
        return type;
    }

    public void setType(SalaryFieldTypeEntity type) {
        this.type = type;
    }

    public NumOperation getPersonalSalaryNumOp() {
        return personalSalaryNumOp;
    }

    public void setPersonalSalaryNumOp(NumOperation personalSalaryNumOp) {
        this.personalSalaryNumOp = personalSalaryNumOp;
    }

    public NumOperation getCompanyCostNumOp() {
        return companyCostNumOp;
    }

    public void setCompanyCostNumOp(NumOperation companyCostNumOp) {
        this.companyCostNumOp = companyCostNumOp;
    }

    public SalaryTaxTypeEntity getTaxType() {
        return taxType;
    }

    public void setTaxType(SalaryTaxTypeEntity taxType) {
        this.taxType = taxType;
    }

    public BenefitsPayer getPayer() {
        return payer;
    }

    public void setPayer(BenefitsPayer payer) {
        this.payer = payer;
    }

    public BenefitsPayer getActualPayer() {
        return actualPayer;
    }

    public void setActualPayer(BenefitsPayer actualPayer) {
        this.actualPayer = actualPayer;
    }

    public ReferencePropertyEntity getRefProperty() {
        return refProperty;
    }

    public void setRefProperty(ReferencePropertyEntity refProperty) {
        this.refProperty = refProperty;
    }

    public boolean isTaxMergeField() {
        return taxMergeField;
    }

    public void setTaxMergeField(boolean taxMergeField) {
        this.taxMergeField = taxMergeField;
    }

    public boolean isImportField() {
        return importField;
    }

    public void setImportField(boolean importField) {
        this.importField = importField;
    }

    public boolean isExportField() {
        return exportField;
    }

    public void setExportField(boolean exportField) {
        this.exportField = exportField;
    }
}